<template>
  <view class="my-search-container" :style="{'background-color':bgcolor}">
    <!-- 使用view组件模拟input输入框的样式 -->
    <view class="my-search-box" :style="{'border-radius':bgradious + 'px'}">
      <uni-icons type="search" size="17"></uni-icons>
      <text>搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my_search",
    data() {
      return {
        
      };
    },
    props: {
      // 背景颜色
      bgcolor: {
        type:String,
        default:'#C00000'
      },
      // 圆角尺寸
      bgradious: {
        type:Number,
        default:25
      }
    }
  }
</script>

<style lang="scss">
.my-search-container {
  // background-color: #C00000;
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  .my-search-box {
    height: 40px;
    width: 100%;
    // border-radius: 25px;
    text-align: center;
    margin-bottom: 5px;
    line-height: 40px;
    font-size: 15px;
    background-color: #fff;
    text {
      margin-left: 5px;
    }
  }
}
</style>